var echarts = require("echarts");

var BingMapCoordSys = require("./BingMapCoordSys");

require("./BingMapModel");

require("./BingMapView");

/**
 * BMap component extension
 */
echarts.registerCoordinateSystem('bingmap', BingMapCoordSys); // Action

echarts.registerAction({
  type: 'bingmapRoam',
  event: 'bingmapRoam',
  update: 'updateLayout'
}, function (payload, ecModel) {
  ecModel.eachComponent('bingmap', function (bingMapModel) {
    var bingmap = bingMapModel.getBingMap();
    var center = bingmap.getCenter();
    bingMapModel.setCenterAndZoom([center.longitude, center.latitude], bingmap.getZoom());
  });
});
var version = '1.0.0';
exports.version = version;